<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			var reg=/china/i;
			//var str="We live in china";
			var str="China is our motherland";
			alert(reg.test(str));
			
			var str2="We love 8 and 6,but German like 4 and usa doesn't like 13";
			//str2第一个数字出现的位置
			var reg2=/\d+/g;
			str2=str2.replace(reg2,"发");
			alert(str2);
		</script>
	</head>
	<body>
	</body>
</html>
